package com.kaigejava.celue.patterns;


import com.kaigejava.celue.patterns.behaviorinterface.impl.GaGaQuackBehavior;
import com.kaigejava.celue.patterns.behaviorinterface.impl.GoodFlyBehavior;

/**
 * Created by kaigejava on 2019/8/9.
 * 这里是绿头鸭
 */
public class GreenHeadDuck  extends Duck {
    public GreenHeadDuck(){
       myFlyBehavior = new GoodFlyBehavior();
       myQuackBehavior = new GaGaQuackBehavior();
    }
    @Override
    public void display() {
        System.out.println("~~ i'm  GreenHeadDuck ~~ gaga");
    }
}
